<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<head>
    <c:if test="${msg!=null}">
        <script type="text/javascript">
            var msg = "${msg}";
            alert(msg);
        </script>
    </c:if>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script>
        function Ashow() {
            new Face("inputbox").show()
        }
    </script>

    <meta name="viewport" content="width=device-width">
    <script type="text/javascript" src="script/home.js"></script>
    <script type="text/javascript" src="script/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="script/face.js"></script>
    <script type="text/javascript" src="script/friend.js"></script>
    <script type="text/javascript" src="script/ajax.js"></script>

    <script type="text/javascript" src="script/profile.js"></script>
    <!--网页页面-->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>微博</title>
    <link rel="stylesheet" type="text/css" media="all" href="testJs/style.css">
    <link rel="stylesheet" type="text/css" media="all" href="testJs/mo.css">
    <script type="text/javascript" src="testJs/jquery.js "></script>
    <script type="text/javascript" src="testJs/touchslide.js "></script>
    <link rel="stylesheet" id="dashicons-css" href="testJs/dashicons.min.css" type="text/css" media="all">
    <link rel='stylesheet' id='admin-bar-css' href='testJs/admin-bar.min.css' type='text/css' media='all'/>
    <style type="text/css" media="print">#wpadminbar {
        display: none;
    }</style>
    <style type="text/css" media="screen">
        html {
            margin-top: 32px !important;
        }

        * html body {
            margin-top: 32px !important;
        }

        @media screen and ( max-width: 782px ) {
            html {
                margin-top: 46px !important;
            }

            * html body {
                margin-top: 46px !important;
            }
        }
    </style>
</head>
<body class="bg">
<%@include file="header.jsp" %>
<div id="header" class="pt15">
    <div class="wrapper">
        <div class="nav fl">
            <a href="javascript:;" class="nav-m"><i class="mo-menu"></i></a>
            <div class="logo fl">
                <h1><a href="http://localhost/wordpress" title="微博"><img src="images/logo.png"></a>
                </h1>
            </div>
            <ul class="menu fr">
                <div class="menu">
                    <ul>
                        <li class=""><a href="home"> 首页</a></li>
                    </ul>
                </div>
            </ul>
        </div>
        <div class="tool fr">
            <a href="publish"><i class="mo-pencil"></i>发布</a>
            <a class="sogin" href="login2"><i class="mo-user"></i>登录</a>
            <a class="sch" href="javascript:;"><i class="mo-search"></i>搜索</a>
        </div>
    </div>
</div>
<div id="banner" style="display: block;">
    <div class="wrapper clearfix">
        <span class="iclose fr"><i class="mo-cancel-circled-outline"></i></span>
        <div class="search zhenghei">
            <form action="search?ac=weibo&pag=1" method="post">
                <input name="key" id="search" class="st fl" value="请输入关键词搜索..."
                       onblur="if (this.value == &#39;&#39;) {this.value = &#39;请输入关键词搜索...&#39;;}"
                       onfocus="if (this.value == &#39;请输入关键词搜索...&#39;) {this.value = &#39;&#39;;}" type="text">
                <button value="" class="but fr" type="submit"><i class="mo-search"></i></button>
            </form>
        </div>
    </div>
</div>
<!--weibo开始-->
<div id="content">
    <div class="wrapper">
        <div class="main fl">
            <div class="list w750 mt35">
                <h3 class="h3">最新文章</h3>
                <div class="post-list fl mt15">
                    <c:forEach items="${weiboList}" var="weibo">
                        <div class="post-info">
                            <div class="pic fl">
                                <a target="_blank">
                                    <c:if test="${weibo.mImage != 'null'}">

                                        <img src="${weibo.mImage}" id="${weibo.mId}"
                                             onclick="imgAct(${weibo.mId})" height="160px" width="230px"/>
                                    </c:if>
                                    <c:if test="${weibo.mImage == 'null'}">
                                        <img src="${weibo.user.images}" height="160px" width="230px"/>
                                    </c:if>
                                </a>
                            </div>
                            <div class="post-content w490 fr">
                                <div class="post-tit">

                                </div>
                                <div class="post-artice">
                                    <img src="${weibo.user.images}" width="50"
                                         height="50"/>
                                    <span style="width:88%" class="content"><a
                                            href="userIndex?userId=${weibo.user.id}" target="_blank">${weibo.user.nickName}</a><img
                                            src="icon/v.gif"
                                            width="11"
                                            height="10"
                                            align="middle"/><br>
                                </span>
                                        ${weibo.mBody}
                                </div>
                                <div class="post-in">
                                    <span>${weibo.publishTime}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
                                    <span id="like${weibo.mId}" onclick="like(${weibo.mId})" style="cursor:pointer">
                                    <c:if test="${weibo.b==false}">赞(${weibo.mLike})</c:if>
                                    <c:if test="${weibo.b==true}">已赞(${weibo.mLike})</c:if>
                                        &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                </span>

                                    <span id="trans${weibo.mId}" onclick="trans(${weibo.mId})"
                                          style="cursor:pointer">转发(${weibo.mTranum})
                                    &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
                                </span>
                                    <span id="coll${weibo.mId}" onclick="coll(${weibo.mId})"
                                          style="cursor:pointer">收藏
                                    </span>
                                    <a class="fr" href="getComm?weiboId=${weibo.mId}&p=1&fy=0"
                                       target="_blank">more+</a>
                                </div>

                            </div>
                        </div>
                    </c:forEach>
                </div>
            </div>
            <span style="float: right" id="userinfo">
                <ul>
                <li align="right">
                    <c:if test="${pageNum!=1}">
                        <a href="home?pageNum=${pageNum-1}" style="text-decoration:none">上一页</a>&nbsp; &nbsp;
                    </c:if>
                    第&nbsp; ${pageNum} &nbsp;页 &nbsp;&nbsp;
                    <c:if test="${pageNum <pageTotal}">
                        <a href="home?pageNum=${pageNum+1}" style="text-decoration:none">下一页</a>
                    </c:if>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    共 &nbsp; ${pageTotal} &nbsp;页
                </li>
            </ul>
            </span>
        </div>
        <div class="sidebar w320 fr">
            <div id="localtime">
                <font>2019-04-26 18:27:30 星期五</font>
            </div>
            <jsp:include page="userinfo.jsp"/>
        </div>


        <jsp:include page="footer.jsp"/>
    </div>
    <div class="other">
        <a class="backtop" href="javascript:;" style="display: none;"><i class="mo-up"></i></a>
    </div>
    <script type="text/javascript" src="testJs/admin-bar.min.js "></script>
    <script type="text/javascript" src="testJs/wp-embed.min.js "></script>
    <!--[if lte IE 8]>
    <script type="text/javascript">
        document.body.className = document.body.className.replace(/(^|\s)(no-)?customize-support(?=\s|$)/, '') + ' no-customize-support';
    </script>
    <![endif]-->
    <!--[if gte IE 9]><!-->

    <!--<![endif]-->

</div>
<script type="text/javascript" src="testJs/slide.js "></script>
<script type="text/javascript" src="testJs/online.js "></script>
</body>
</html>